KFbxLayerContainer Class Reference

#include <kfbxlayercontainer.h>
Inheritance diagram for KFbxLayerContainer:
Inheritance graph
[legend]

List of all members.


Detailed Description

Contains a collection of KFbxLayer objects.

This class is used for managing layers construction, destruction and access. See KFbxLayerElement for more details.

See also:
KFbxLayer

Definition at line 61 of file kfbxlayercontainer.h.


Layer Management

int  CreateLayer ()
  Creates a new layer on top of existing layers.
void  ClearLayers ()
  Deletes all layers.
int  GetLayerCount () const
  Returns the number of layers.
int  GetLayerCount (KFbxLayerElement::ELayerElementType pType, bool pUVCount=false) const
  Returns the number of layers that contain the specified layer element type.
KFbxLayer GetLayer (int pIndex)
  Returns the layer at the specified index.
KFbxLayer const *  GetLayer (int pIndex) const
  Returns the layer at the specified index.
KFbxLayer GetLayer (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false)
  Returns the n'th layer as specified by pIndex that contains the specified layer element type.
KFbxLayer const *  GetLayer (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const
  Returns the n'th layer as specified by pIndex that contains the specified layer element type.
int  GetLayerIndex (int pIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const
  Returns the global index of the n'th layer as specified by pIndex that contains the specified layer element type.
int  GetLayerTypedIndex (int pGlobalIndex, KFbxLayerElement::ELayerElementType pType, bool pIsUV=false) const
  Converts the layer's global index to a type-specific index.

Public Member Functions

virtual EAttributeType  GetAttributeType () const
  Returns the type of node attribute.
bool  ConvertDirectToIndexToDirect (int pLayer)
  Converts the reference mode from eDIRECT to eINDEX_TO_DIRECT.

Member Function Documentation

virtual EAttributeType GetAttributeType (  )  const [virtual]

Returns the type of node attribute.

Reimplemented from KFbxNodeAttribute.

Reimplemented in KFbxGeometry, KFbxMesh, KFbxNurb, KFbxNurbsCurve, KFbxNurbsSurface, KFbxPatch, KFbxSubdiv, KFbxBoundary, and KFbxTrimNurbsSurface.

int CreateLayer (  ) 

Creates a new layer on top of existing layers.

Returns:
Index of created layer or -1 if an error occurs.

void ClearLayers (  ) 

Deletes all layers.

int GetLayerCount (  )  const

Returns the number of layers.

Returns:
The number of layers.

int GetLayerCount ( KFbxLayerElement::ELayerElementType  pType,
bool  pUVCount = false  
) const

Returns the number of layers that contain the specified layer element type.

Parameters:
pType  The specified Layer Element type.
pUVCount  When true, requests the UV layer element corresponding to the specified texture type.
Returns:
The number of layers containing the specified layer element type.

KFbxLayer* GetLayer ( int  pIndex  ) 

Returns the layer at the specified index.

Parameters:
pIndex  Layer index.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

KFbxLayer const* GetLayer ( int  pIndex  )  const

Returns the layer at the specified index.

Parameters:
pIndex  Layer index.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

KFbxLayer* GetLayer ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false  
)

Returns the n'th layer as specified by pIndex that contains the specified layer element type.

If the pType is KFbxLayerElement::eUV, this method will return the n'th layer as specified by pIndex that contains the diffuse UV. For example, GetLayer(int pIndex, KFbxLayerElement::eUV) is same as GetLayer(int pIndex, KFbxLayerElement::eDIFFUSE_TEXTURES, true).

Parameters:
pIndex  Layer index.
pType  The specified layer element type.
pIsUV  When true, requests the UV layer element that corresponds with the specified texture type.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

KFbxLayer const* GetLayer ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false  
) const

Returns the n'th layer as specified by pIndex that contains the specified layer element type.

If the pType is KFbxLayerElement::eUV, this method will return the n'th layer as specified by pIndex that contains the diffuse UV. For example, GetLayer(int pIndex, KFbxLayerElement::eUV) is same as GetLayer(int pIndex, KFbxLayerElement::eDIFFUSE_TEXTURES, true).

Parameters:
pIndex  Layer index.
pType  The specified layer element type.
pIsUV  When true, requests the UV layer element that corresponds with the specified texture type.
Returns:
Pointer to the layer, or NULL if pIndex is out of range.

int GetLayerIndex ( int  pIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false  
) const

Returns the global index of the n'th layer as specified by pIndex that contains the specified layer element type.

Parameters:
pIndex  Layer index of the specified type.
pType  The specified layer element type.
pIsUV  When true, requests the UV layer element that corresponds with the specified texture type.
Returns:
Global index of the n'th layer as specified by pIndex that contains the specified layer element type, or -1 if the layer is not found.
Remarks:
The returned index is the position of the layer in the global array of layers. You can use the returned index to call GetLayer(int pIndex).

int GetLayerTypedIndex ( int  pGlobalIndex,
KFbxLayerElement::ELayerElementType  pType,
bool  pIsUV = false  
) const

Converts the layer's global index to a type-specific index.

Parameters:
pGlobalIndex  The index of the layer in the global array of layers.
pType  The type upon which the type-specific index will be returned.
pIsUV  When true, requests the UV layer element that corresponds with the specified texture type.
Returns:
Layer index of the specified layer element type, or -1 if the layer element type is not found on the layer.

bool ConvertDirectToIndexToDirect ( int  pLayer  ) 

Converts the reference mode from eDIRECT to eINDEX_TO_DIRECT.

Parameters:
pLayer  The Layer to convert.
Returns:
True if conversion is successful, or false otherwise.
KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer
KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer KFbxLayerContainer